package com.haoze.nurseapp.dao;

import com.github.pagehelper.PageInfo;
import com.haoze.common.mapper.MyMapper;
import com.haoze.nurseapp.dto.PatientInHospitalDTO;
import com.haoze.nurseapp.model.CirculationLogEntity;
import com.haoze.nurseapp.model.PatientInHospitalEntity;
import com.haoze.nurseapp.vo.patient.InHospitalPatientVO;
import feign.Param;

import java.util.List;
import java.util.Map;

public interface PatientInHospitalMapper extends MyMapper<PatientInHospitalEntity> {
    PatientInHospitalEntity selectPatientByInpatNum(@Param("inpatNum") String inpatNum);
    PatientInHospitalDTO selectPatientByInpatNum2(@Param("inpatNum") String inpatNum);
    PatientInHospitalDTO selectPatientOutHospByInpatNum(@Param("inpatNum") String inpatNum,@Param("circulationLogId") String circulationLogId,
                                                        @Param("operationFlag") String operationFlag);

    List<InHospitalPatientVO> queryPatientCirculationList(@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("keyWords") String keyWords, @Param("circulationType") String circulationType, @Param("status") String status,@Param("inWardDeptId") String inWardDeptId,@Param("outWardDeptId") String outWardDeptId,@Param("circulationModel") String circulationModel );

    List<Map<String, String>> queryDepDoctorAndNursList(@Param("depId") String depId,@Param("id") String id,@Param("keyWords") String keyWords);

    InHospitalPatientVO queryPatientCirculationDetailByInpatNum(@Param("inpatNum") String inpatNum);

    List<PatientInHospitalEntity> findPatInfoByRowId(@Param("rowId") String rowId);

    /**
     * 获取病人信息
     *  taokuan
     * @param inpatNum
     * @return
     */
    Map<String, String> getPatientInfo(@Param("inpatNum") String inpatNum);

    Map<String, String> queryPatientOtherInfo(@Param("inpatNum") String inpatNum);

    Map<String,String> queryDiagById(@Param("diagId") String diagId);

    Map<String, String> getPatientInfoNurse(@Param("inpatNum") String inpatNum,@Param("wardId") String wardId,@Param("keyWords") String keyWords);
    Map<String, String> getPatientInfoNurseByLogId(@Param("inpatNum") String inpatNum,@Param("wardId") String wardId,@Param("keyWords") String keyWords,@Param("circulationLogId") String circulationLogId);

    String queryDeptCodeByDeptId(@Param("deptId") String deptId);
    Map<String, String> queryDeptCodeByDeptId2(@Param("deptId") String deptId);

    String queryUserIdByPersonId(@Param("personId") String personId);
    String queryPersonCodeByUserId(@Param("userId") String userId);

    List<Map<String,String>> queryDropDown(@Param("dataVersionId") String dataVersionId,
                                           @Param("selectValue") String selectValue,
                                           @Param("dataValueId") String dataValueId,
                                           @Param("keyWords") String keyWords);

    List<Map<String,String>> queryReligionList(@Param("basicdatavalueId") String basicdatavalueId,
                                               @Param("keyWords") String keyWords);

    List<Map<String,String>> queryDiagnosisList(@Param("diagId") String diagId,@Param("keyWords") String keyWords);
    List<Map<String,String>> queryOperationList(@Param("id") String id,@Param("keyWords") String keyWords);
    Map<String,String> queryOperationInfoById(@Param("operId") String operId,@Param("operIcd") String operIcd,@Param("operName") String operName);

    List<Map<String,String>> queryDeptList(@Param("id") String id,@Param("keyWords") String keyWords);
}
